<div class="container member-container">
  <?php include $this->getViewFile('../lib/leftmenu'); ?>
  <div class="col-md-10 message_center">
      <div class="title "> <span>消息中心</span>&nbsp;&nbsp;共<font style="color:#FF0066;"><?php echo $count; ?></font>条
      <?php
	  if($count){
	  ?>
      <a href="<?php echo YzwController::U("deleteall") ?>"style="float: right;padding-right: 50px;color: red ;">清空已读消息</a>
      <?php
	  }
	  ?>
      </div>
    <?php
	foreach($data as $rs){
		echo $this->templates($rs->attributes);
	}
	?>
    <div class="pager" id="pager"><?php echo $Page; ?></div>
  </div>
  <div class="clearfix"></div>
</div>
<link rel="stylesheet" href="<?php echo Yii::app()->params->staticUrl; ?>statics/js/artDialog6/css/ui-dialog.css">
<script src="<?php echo Yii::app()->params->staticUrl; ?>statics/js/artDialog6/js/dialog-min.js"></script> 
<script type="text/javascript">
$(".close_message").click(function() {
    var nid = $(this).data('nid');
    var obj = this;
    $.getJSON('<?php echo YzwController::U("delete") ?>', {
            "nid": nid
        },
        function(data) {
            var d = dialog({
                content: data.info,
                quickClose: true
            });
            if (data.status) {
                $('#nid_' + nid).hide();
                d.show();
            } else {
                d.show(obj);
            }
        });
});
</script>